package com.crm.business.crm.mapper;


import com.crm.common.crm.entity.BO.CrmRoiSearchBO;
import com.crm.common.crm.entity.PO.CrmPutinStatistics;
import com.crm.business.servlet.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface CrmPutinStatisticsMapper extends BaseMapper<CrmPutinStatistics> {

    CrmPutinStatistics queryStatisticsByPlatformAndPutinDormData(@Param("putinPlatform") String putinPlatform, @Param("putinFormDate") Date putinFormDate);

    CrmPutinStatistics queryStatisticsByPlatformAndPutinDormData(@Param("putinPlatform") String putinPlatform, @Param("putinFormDate") String putinFormDate);


    /**
     * 分页查询 总数
     * @param search
     * @return
     */
    public Integer queryPageListCount(@Param("data") CrmRoiSearchBO search);


    /**
     * 分页查询 列表
     * @param search
     * @return
     */
    public List<CrmPutinStatistics> queryPageList(@Param("data") CrmRoiSearchBO search);


    /**
     * 根据平台查询合同相关信息
     */
    public List<CrmPutinStatistics> queryByPlatfrom(@Param("data") CrmRoiSearchBO search);


    /**
     * 本渠道所有合同的全部金额(本年)
     */
    public List<CrmPutinStatistics> queryAllNoTimeMoney(@Param("data") CrmRoiSearchBO search);

    /**
     * 本渠道金额(不限制投放时间)
     */
    public List<CrmPutinStatistics> queryAllRoiMoney(@Param("data") CrmRoiSearchBO search);

    /**
     * 合同和回款金额(本年)
     */
    public List<CrmPutinStatistics> queryYearMoney(@Param("data") CrmRoiSearchBO search);

}
